|
Controller tuning exerciseStep 1Load the model ControllerTuning.apros. Run a sequence from SCL console that first sets the value of the set point ( execute :: <Action,Proc> a -> Sequence a (Simantics/Sequences) The sequence setVar :: Serializable a => String -> a -> <Action> () (Simantics/Sequences) Sets the value of a variable wait :: Double -> Sequence () (Simantics/Sequences) The sequence stop :: Sequence a (Simantics/Sequences) The sequence Open the chart and examine the results. Step 2Put your sequence inside a function that takes the controller parameters
Step 3Create a separate simulation thread that computes the last time the flow speed
getVar :: Serializable a => String -> <Action> a (Simantics/Sequences) Returns the current value of a variable fork :: Sequence a -> Sequence () (Simantics/Sequences) The sequence repeatForever :: Monad a => a b -> a c (Prelude) Sequences the given monadic value infinitely:
Step 4Try the optimization routine with function
Step 5Optimize the controller parameters using the objective function you created in step 3. |